home *** CD-ROM | disk | FTP | other *** search
- property pSprite, spriteNum, pLocV, pFullScale, pScale, pHighScale, pFuck
- global gFrog, gInMotion, gFloats, gCurrentFloat, gLives, sp, gScore, gScoreBox, gLivesIcons, splashEffect, levelnum
-
- on beginSprite me
- pSprite = sprite(spriteNum)
- gFrog = pSprite
- pLocV = pSprite.locV
- pSprite.loc = gFloats[1].loc
- pFullScale = [float(pSprite.width), float(pSprite.height)]
- pScale = 1.0
- pFuck = 1
- pSprite.locZ = spriteNum
- end
-
- on mouseDown me
- gCurrentFloat.mouseDown()
- end
-
- on mJump me
- pSprite.member = member("frog2")
- pHighScale = 0
- timeout("jump").new(10, #jumpFrom, me)
- end
-
- on mBlink me
- pSprite.visible = 0
- s = the ticks + 5
- repeat while the ticks < s
- updateStage()
- end repeat
- pSprite.visible = 1
- s = the ticks + 5
- repeat while the ticks < s
- updateStage()
- end repeat
- pSprite.visible = 0
- s = the ticks + 5
- repeat while the ticks < s
- updateStage()
- end repeat
- pSprite.visible = 1
- s = the ticks + 5
- repeat while the ticks < s
- updateStage()
- end repeat
- pSprite.visible = 0
- s = the ticks + 5
- repeat while the ticks < s
- updateStage()
- end repeat
- pSprite.visible = 1
- s = the ticks + 5
- repeat while the ticks < s
- updateStage()
- end repeat
- end
-
- on jumpFrom me
- if (pScale < 2.0) and not pHighScale then
- pFuck = 1
- pScale = pScale + 0.05
- pSprite.width = pFullScale[1] * pScale
- pSprite.height = pFullScale[2] * pScale
- if pScale >= 1.5 then
- pHighScale = 1
- end if
- if (pSprite.locV - gFloats[gFloats.findPos(gCurrentFloat) + 1].locV) > 0 then
- pSprite.locV = pSprite.locV - 7.5
- end if
- else
- if pScale > 1 then
- pScale = pScale - 0.05
- pSprite.width = pFullScale[1] * pScale
- pSprite.height = pFullScale[2] * pScale
- if (pSprite.locV - gFloats[gFloats.findPos(gCurrentFloat) + 1].locV) > 0 then
- pSprite.locV = pSprite.locV - 7.5
- end if
- else
- if isFrogOn(gFloats[gFloats.findPos(gCurrentFloat) + 1]) and pFuck and gFloats[gFloats.findPos(gCurrentFloat) + 1].visible then
- gScore = gScore + (((5 * gLives) + (gLives * (gFloats.findPos(gCurrentFloat) + 1))) * levelnum)
- if gLives <= 0 then
- gScore = gScore + (5 * levelnum)
- end if
- gScoreBox.text = string(gScore)
- pSprite.member = member("frog1")
- gCurrentFloat = gFloats[gFloats.findPos(gCurrentFloat) + 1]
- pLocV = pSprite.locV
- pHighScale = 0
- timeout("jump").forget()
- if gFloats.findPos(gCurrentFloat) = gFloats.count then
- s = the ticks + 150
- repeat while the ticks < s
- updateStage()
- end repeat
- if gLives = 5 then
- gScore = gScore + (50 * levelnum)
- gScoreBox.text = string(gScore)
- end if
- if levelnum = 3 then
- go("Game over")
- else
- levelnum = levelnum + 1
- go("level com")
- end if
- else
- if gCurrentFloat.member.name = "turtle" then
- timeout("follow").new(30, #followCurrentFloat, me)
- else
- if gCurrentFloat.pFla then
- timeout("followy").new(30, #followCurrentFloat, me)
- end if
- end if
- if (gFloats.findPos(gCurrentFloat) <> 1) and (gFloats.findPos(gCurrentFloat) <> 19) and ((gFloats.findPos(gCurrentFloat) mod 2) <> 0) then
- gInMotion = 1
- repeat with i in gFloats
- i.pGo = 1
- updateStage()
- end repeat
- end if
- end if
- else
- if pSprite.locZ > 2 then
- puppetSound(6, member("splashfx"))
- splashEffect.loc = pSprite.loc
- splashEffect.member = member("splash")
- timeout("remove").new(1300, #removeSplash, me)
- end if
- pSprite.locZ = 2
- pFuck = 0
- pSprite.member = member("frog3")
- if pScale > 0.55000000000000004 then
- if pSprite.blend > 0 then
- pSprite.blend = pSprite.blend - 1
- end if
- pScale = pScale - 0.005
- pSprite.width = pFullScale[1] * pScale
- pSprite.height = pFullScale[2] * pScale
- else
- if gLives > 0 then
- gLivesIcons[gLives].visible = 0
- end if
- gLives = gLives - 1
- pHighScale = 0
- timeout("jump").forget()
- if gLives >= 0 then
- pSprite.blend = 100
- pSprite.locZ = spriteNum
- pScale = 1.0
- gFrog.member = member("frog1")
- gFrog.loc = gCurrentFloat.loc
- pLocV = gFrog.locV
- gFrog.width = pFullScale[1]
- gFrog.height = pFullScale[2]
- if gCurrentFloat.member.name = "turtle" then
- timeout("follow").new(25, #followCurrentFloat, me)
- else
- if gCurrentFloat.pFla then
- timeout("followy").new(25, #followCurrentFloat, me)
- end if
- end if
- gInMotion = 1
- gFrog.mBlink()
- gInMotion = 0
- else
- go("Game over")
- end if
- end if
- end if
- end if
- end if
- end
-
- on removeSplash me
- timeout("remove").forget()
- splashEffect.member = member("dottie")
- splashEffect.loc = point(-100, -100)
- end
-
- on followCurrentFloat me
- if gCurrentFloat.member.name = "turtle" then
- pSprite.loc = pSprite.loc + [gCurrentFloat.pSpeed, 0]
- else
- pSprite.loc = pSprite.loc + [gCurrentFloat.pdir, 0]
- end if
- end
-